<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //1, 倒遍历  再放到数组输出

        //翻转 前后调换
        let arr = ['关羽', '张飞', '程咬金', '吕布'];
        let arr1 = []; //空数组用来接收

        for (let i = arr.length - 1; i >= 0; i--) {//i 是索引号index

            // console.log(index, arr[index]); 倒遍历了一遍
            arr1[arr1.length] = arr[i]; //空数组的长度等于一个索引号遍历的
        }
        console.log(arr1);
    </script>
</body>

</html>